#include <stdlib.h>
#include <stdio.h>   /****1****/
#include <math.h> 
#include <sys/wait.h>

int main(int argc, char *argv[]){
	if (argc!=2){
		printf("usage: %s exeName\n",argv[0]);
		exit(-1);
	}
	int i,j;
	int iterArr[] = {1,10,100,1000,10000,100000,1000000};
	int threadsArr[]={1,4,8,12,16};
	char buffer [50];

	for (i=0; i<7;i++){
		for (j=0; j<5; j++){
			sprintf (buffer, "%s %d %d", argv[1], threadsArr[j], iterArr[i]);
			system(buffer);
		}
	}

	return 0;
}
